package com.dhf.ssh.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.dhf.ssh.service.PersonService;

/**
 * Created by XRom On 11/16/2017.11:59 PM
 */
@Controller
public class TestController {

	@Autowired(required = true)
	private PersonService personService;

	@RequestMapping(value = "/test", method = RequestMethod.GET)
	public String test() {
		return "test";
	}

	@RequestMapping(value = "/savePerson", method = RequestMethod.GET)
	@ResponseBody
	public String savePerson() {
		personService.savePerson();
		String s = "";
		return "success!";
	}
}
